import Vue from 'vue'
import VueRouter from 'vue-router'
import Home from '../views/Home.vue'
import Login from "../views/Login";
import User from "../views/user/User";
import Register from "../views/register/Register";
import RegisterRecord from "../views/register/RegisterRecord";
import Outpatients from "../views/outpatients/Outpatients";
import Drugs from "../views/drugs/Drugs";
import OutpatientsRecord from "../views/outpatients/OutpatientsRecord";
import ChargeOutpatients from "../views/charge/ChargeOutpatients";
import UserInfo from "../views/UserInfo";

Vue.use(VueRouter)

const routes = [
  /*{
    path: '/',
    name: 'Login',
    component: Login
  },
  {
    path: '/Home',
    name: '首页',
    component: Home,
    children:[
      {
        path:'/Register',
        name:'预约挂号',
        component: Register
      },
      {
        path:'/RegisterRecord',
        name:'挂号记录',
        component: RegisterRecord

      },
      {
        path:'/Outpatients',
        name:'门诊就诊',
        component: Outpatients
      },
      {
        path:'/OutpatientsRecord',
        name:'就诊记录',
        component: OutpatientsRecord
      },
      {
        path:'/ChargeOutpatients',
        name:'门诊收费',
        component: ChargeOutpatients
      },
      {
        path:'/Drugs',
        name:'药品管理',
        component: Drugs
      },
      {
        path:'/User',
        name:'操作员管理',
        component: User
      }

    ]
  }*/

  {
    path: '/',
    name: 'Login',
    component: Login,
    hidden: true
  },
  {
    path: '/home',
    name: 'Home',
    component: Home,
    children:[
      {
        path:'/userInfo',
        name:'个人中心',
        component:UserInfo
      }
    ]
  }

]

const router = new VueRouter({
  routes
})

export default router
